package com.cloud.hotline.api.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cloud.hotline.api.bean.HotlineCleanForm;
import com.cloud.hotline.api.service.HotlineCleanService;
import com.cloud.hotline.common.result.Quokka;

@RestController
@RequestMapping("hotline/api/clean")
public class HotlineCleanController {

	@Autowired
	private HotlineCleanService hotlineCleanService;
	
	
	@PostMapping("list")
	public Quokka list(@RequestBody HotlineCleanForm form){
		return new Quokka(true, hotlineCleanService.list(form));
	}
	
	@PostMapping("submit")
	public Quokka submit(@RequestBody HotlineCleanForm form){
		return new Quokka(true, hotlineCleanService.submit(form));
	}
	
}
